package collision;

import java.util.Enumeration;

import javax.media.j3d.Behavior;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.WakeupOnCollisionEntry;

import animation.Shoot;

public class ShootCollision extends Behavior{

	private Shoot target = null;
	
	public ShootCollision(Shoot target) {
		this.target = target;
		this.setSchedulingBounds(new BoundingSphere());
	}
	
	@Override
	public void initialize() {
		// TODO Auto-generated method stub
		this.wakeupOn(new WakeupOnCollisionEntry(this.target));
	}

	@Override
	public void processStimulus(Enumeration arg0) {
		// TODO Auto-generated method stub
		this.wakeupOn(new WakeupOnCollisionEntry(this.target));
		
		this.target.destroyShoot();
	}
}
